package com.ssy.lingxi.purchase.repository;

import com.ssy.lingxi.purchase.entity.purchaseinquiry.PurchaseInquiryProduct;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
*采购询价单-物料信息表
* @author wrc
* @date 2020/7/8
*/
@Repository
public interface PurchaseInquiryProductRepository extends JpaRepository<PurchaseInquiryProduct, Long>, JpaSpecificationExecutor<PurchaseInquiryProduct> {


    List<PurchaseInquiryProduct> findAllByPurchaseInquiryId(Long purchaseInquiryId);
    List<PurchaseInquiryProduct> findAllByPurchaseInquiryIdIn(Set<Long> ids);

    void deleteAllByPurchaseInquiryId(Long purchaseInquiryId);


    void deleteAllByPurchaseInquiryIdIn(List<Long> purchaseInquiryIds);
}
